//
//  XCHVideoView.m
//  视频悬浮框OC
//
//  Created by 解楚豪 on 2018/9/10.
//  Copyright © 2018年 xch. All rights reserved.
//

#import "XCHVideoView.h"
#import "XCHPlay.h"

@interface XCHVideoView ()

@end

@implementation XCHVideoView

-(instancetype)init{
    self = [[[NSBundle mainBundle]loadNibNamed:@"XCHVideoView" owner:self options:nil]lastObject];
    if (self) {
        NSLog(@"-====-===--123");
    }
    return self;
}

-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    self = [super initWithCoder:aDecoder];
    if (self) {
        NSLog(@"-=-=-==-=====-456");
    }
    return self;
}

-(void)setUrl:(NSString *)url{
    [XCHPlay shareInstance].videoURL = url;
    [XCHPlay shareInstance].videoFrame = self.bounds;
    [[XCHPlay shareInstance] addSupview:self];
    [[XCHPlay shareInstance] videoPlay];
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
